1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a computer program product.
2. Description of the Related Art
For digital still cameras (hereinafter, “digital camera”), there is a known conventional technology to determine a face area from an image to be captured and automatically focus the digital camera on the face area. However, such conventional technology requires a long processing time because a face area is determined by cutting out an image of a certain area from an image to be processed and matching various templates with the cut-out image. That is, a number of times of matching operation is required.
For example, Japanese Patent Application Laid-open No. 2004-334836 discloses an conventional image processing apparatus that reduces the processing time by setting the upper and lower limits of the size of an image to be cut out of an image to be processed.
However, the conventional image processing apparatus has to measure a distance to an object before determining an image area. Thus, when a distance to an object other than a person, for example, background is measured, the upper and lower limits of the size of an image to be cut out cannot appropriately be set. Therefore, the processing time cannot be reduced.
Moreover, it is not possible to determine which direction of an image to be processed is downward, i.e., which direction of an image is a direction in which a person's face is upright. Therefore, templates are prepared for four directions of the image to determine a face area, which does not allow reduction in the processing time.